﻿<include file="Public/header"/>
<include file="Public/menu"/>
<div class="page-content">
	<div class="page-header">
		<h1>
			修改密码
		</h1>
	</div>
	<!-- /.page-header -->
	<!-- PAGE CONTENT BEGINS -->
	<div class="row">
		<div class="col-xs-12">
				<form id="ajaxForm" class="form-horizontal" action="{:U('Setting/updatepw')}" method="post">
					<div class="control-group">
						<label class="control-label" for="input01">原密码:</label>

						<div class="controls">
							<input type="password" class="input-xlarge" name="oldpassword">
						</div>
					</div>
					<div class="control-group">
						<label class="control-label" for="input01">新密码:</label>

						<div class="controls">
							<input type="password" class="input-xlarge" id="input01" name="password">
						</div>
					</div>
					<div class="control-group">
						<label class="control-label" for="input01">重复新密码:</label>

						<div class="controls">
							<input type="password" class="input-xlarge" id="input01" name="repassword">
						</div>
					</div>
					<div class="form-actions">
						<button type="submit" class="btn btn-primary btn_submit  J_ajax_submit_btn">提交</button>
					</div>
				</form>
		</div>
	</div>
	<!-- PAGE CONTENT END -->
	<script>
		seajs.use(['$', 'bootstrap-min', 'bootbox', 'form-ajax'], function ($) {
			var ajaxFrom = $('#ajaxForm');
			ajaxFrom.ajaxForm({
				dataType : 'json',
				success : function (data) {
					if ( data.status > 0 && data.url ) {
						bootbox.confirm(data.info, function (result) {
							if ( result ) {
								window.location.href = data.url;
								return false;
							}
						});
					} else {
						bootbox.alert({
							message : data.info,
							title : "提示信息"
						});
						return false;
					}
				}
			})
		})
	</script>
</div>
<include file="Public/footer"/>